<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约详情</title>
    <link rel="stylesheet" href="../css/page-health-orderDetail.css" />
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script>
        var id = getUrlParam("id");//预约ID
        var order_id = getUrlParam("order_id");
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-img">
                <img :src="imgUrl" width="100%" height="100%" />
            </div>
            <div class="project-text">
                <h4 class="tit">{{order.name}}</h4>
                <p class="subtit">{{order.remark}}</p>
                <p class="subtit">{{order.price}}</p>
                <p class="keywords">
                    <span>{{order.sex == '0' ? '性别不限' : order.sex == '1' ? '男':'女'}}</span>
                    <span>{{order.age}}</span>
                </p>
            </div>

        </div>
        <div class="table-listbox">
            <ul>
                <li>
                    <div class="box-title">
                        <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                        <span>预约人：</span><span>{{order.membername}}</span>
                    </div>
                </li>
                <li>
                    <div class="box-title">
                        <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                        <span>预约方式：</span><span>{{order.orderType}}</span>
                    </div>
                </li>
                <li>
                    <div class="box-title">
                        <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                        <span>预约时间：</span><span>{{order.date}}</span>
                    </div>
                </li>
                <li>
                    <div class="box-title">
                        <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                        <span>到诊情况：</span><span>{{order.orderStatus}}</span>
                    </div>
                </li>
                <li>
                    <div class="box-title">
                        <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                        <span>预约到诊机构地址：</span><span>{{order.address}}</span>
                    </div>
                </li>
            </ul>
        </div>
        <a href="setmeal.html" >点击查看所有套餐</a>
    </div>
</div>
<script>
    var vue = new Vue({
        el:'#app',
        data:{
            imgUrl:null,//图片
            order:{},//数据
        },
        mounted(){
            //回显页面数据
            axios.post("/order/findOrderById.do?id=" + id + "&order_id=" + order_id).then((resp) => {
                if(resp.data.flag){
                    this.order = resp.data.data;
                    this.imgUrl = 'http://qtleuvi6i.hd-bkt.clouddn.com/' + this.order.img;
                    this.$message({
                        type:'success',
                        message: resp.data.message
                    })
                }
                else {
                    this.$message.error(resp.data.message);
                }
            });
        }
    });
</script>
</body>